Skip to content

fix(assets): stop token rows overflowing the Assets card#295

Merged
QSchlegel merged 1 commit into
preprodfrom
claude/assets-overflow-fix
Jun 13, 2026
Merged

fix(assets): stop token rows overflowing the Assets card#295
QSchlegel merged 1 commit into
preprodfrom
claude/assets-overflow-fix

Conversation

@QSchlegel

Copy link
Copy Markdown
Collaborator

The Assets card clipped token rows on the right (the cut-off "↗1 $S…" for $drep.collective).

Root cause (verified): the token row's flex row + left group lacked min-w-0, so the name/quantity/ticker couldn't shrink below their intrinsic width, and none were truncated — long names/quantities pushed the value column past the card edge. (ADA renders fine because its name is the hardcoded "ADA".)

Fix — wallet-assets.tsx token row

  • min-w-0 on the row, flex-1 min-w-0 on the left group (the actual fix — a flex child can't shrink below content width without min-w-0).
  • flex-shrink-0 on both 60px avatar wrappers (so the image doesn't compress instead of the text).
  • name <h3> truncates with a title tooltip and is bounded via truncateTokenSymbol for the raw-hex fallback; removed ml-auto.
  • value block flex-shrink-0; quantity via numberWithCommas + tabular-nums; ticker truncates max-w-[80px] with a title.

Full name still reachable via tooltip + the Cardanoscan token link (deep-link uses the policyId, unaffected).

Verify

  • Chrome MCP 390px + desktop (card ≈ 1/3 grid width) with a long-named/large-balance token: name ellipsizes, value/ticker pinned inside the right edge, avatar stays round.
  • tsc clean.

Part of the governance/assets UX pass (map→design→judge workflow). Sibling PRs: ballot voting controls + gov-card colored chips.

🤖 Generated with Claude Code

Long token names ($drep.collective) and raw quantities pushed the value/ticker
past the card's right edge (the clipped "↗1 $S…"). Root cause: the flex row +
left group had no min-w-0, so text couldn't shrink, and the name/quantity/ticker
were never truncated.

- min-w-0 on the row + flex-1 min-w-0 on the left group (lets text shrink).
- 60px avatar wrappers flex-shrink-0 (so the image never compresses instead).
- name h3 truncates (+ title tooltip) and is bounded via truncateTokenSymbol
  for the raw-unit hex fallback; remove ml-auto from the link.
- value block flex-shrink-0; quantity via numberWithCommas (tabular-nums);
  ticker truncates with a max width + title.

Full name stays reachable via tooltip + the Cardanoscan token link.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
multisig Ready Ready Preview, Comment Jun 13, 2026 11:08am

Request Review

@QSchlegel QSchlegel merged commit 54ad30f into preprod Jun 13, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant